import { Commit } from "vuex";

interface IBannerList {
  [key: string]: any;
}
interface INavList {
  name: string;
  width: string;
  height: string;
  address: string;
  chooseTitle: string;
  chooseSortBy: string;
  chooseBlackListId: string;
  style: string;
  styleId: string;
  jumpUrl: string;
  choose: {
    [key: string]: string;
  };
}
interface INavSwipeList {
  [key: string]: any;
}
interface IDdqList {
  [key: string]: any;
}
interface IBrandList {
  [key: string]: any;
}
interface IGroupList {
  [key: string]: any;
}
interface IFooterList {
  [key: string]: any;
}
interface ISliderList {
  [key: string]: any;
}
interface IHeaderList {
  id: number;
  img1: string;
  name: string;
}
interface IState {
  headerList: IHeaderList[];
  sliderList: ISliderList[];
  bannerList: string[];
  navList: INavList[];
  navSwipeList: INavSwipeList[];
  ddqList: IDdqList[];
  ddqActive: string;
  brandList: IBrandList[];
  groupList: IGroupList[];
  footerList: IFooterList[];
  footerList2: IFooterList[];
}
interface IData {
  [key: string]: any;
}
interface IHome {
  namespaced: boolean;
  state: IState;
  actions: {
    getHeaderList: ({ commit }: { commit: Commit }) => void;
    getSliderList: (
      { commit }: { commit: Commit },
      { data }: { data: IData }
    ) => void;
    getBannerList: (
      { commit }: { commit: Commit },
      { data }: { data: IData }
    ) => void;
    getNavList: ({ commit }: { commit: Commit }) => void;
    getNavSwipeList: (
      { commit }: { commit: Commit },
      { data }: { data: IData }
    ) => void;
    getDdqList: (
      { commit }: { commit: Commit },
      { data }: { data: IData }
    ) => void;
    getBrandList: (
      { commit }: { commit: Commit },
      { data }: { data: IData }
    ) => void;
    getGroupList: (
      { commit }: { commit: Commit },
      { data }: { data: IData }
    ) => void;
    getFindList: (
      { commit }: { commit: Commit },
      { data }: { data: IData }
    ) => void;
    getChooseList: (
      { commit }: { commit: Commit },
      { data }: { data: IData }
    ) => void;
  };
  mutations: {
    GET_HEADER_LIST: (
      state: IState,
      { payload }: { payload: IHeaderList[] }
    ) => void;
    GET_SLIDER_LIST: (
      state: IState,
      {
        payload,
      }: {
        payload: ISliderList[];
      }
    ) => void;
    GET_BANNER_LIST: (
      state: IState,
      {
        payload,
      }: {
        payload: IBannerList[];
      }
    ) => void;
    GET_NAV_LIST: (state: IState, { payload }: { payload: INavList[] }) => void;
    GET_NAV_SWIPE_LIST: (
      state: IState,
      { payload }: { payload: INavSwipeList[] }
    ) => void;
    GET_DDQ_LIST: (state: IState, { payload }: { payload: IDdqList[] }) => void;
    GET_BRAND_LIST: (
      state: IState,
      { payload }: { payload: IBrandList[] }
    ) => void;
    GET_GROUP_LIST: (
      state: IState,
      { payload }: { payload: IGroupList[] }
    ) => void;
    GET_FIND_LIST: (
      state: IState,
      { payload }: { payload: IFooterList[] }
    ) => void;
    GET_CHOOSE_LIST: (
      state: IState,
      { payload }: { payload: IFooterList[] }
    ) => void;
  };
}
export { IHome };
